package com.iplant.basic.serviceImpl.dao.fmc;

import com.iplant.base.po.OutResult;
import com.iplant.base.po.Pagination;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import com.iplant.basic.service.po.fmc.FMCUnavailable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class FMCUnavailableDAO extends BaseDAO {

    private static FMCUnavailableDAO Instance = null;
    private static Logger logger = LoggerFactory.getLogger(FMCUnavailableDAO.class);

    private FMCUnavailableDAO() {
        super(FMCUnavailable.class);
    }

    public static FMCUnavailableDAO getInstance() {
        if (Instance == null)
            Instance = new FMCUnavailableDAO();
        return Instance;
    }

    public List<FMCUnavailable> GetUnavailableList(BMSEmployee wLoginUser, Calendar wStartTime, Calendar wEndTime, OutResult<Integer> wErrorCode) {

        Map<String, Object> wParams = new HashMap<>();

        wParams.put("StartTime", wStartTime);
        wParams.put("EndTime", wEndTime);
        return this.SelectPOList(wLoginUser, wParams, FMCUnavailable.class, Pagination.getNewMaxSize(), wErrorCode);

    }
}
